<HTML>
<head>
<link href="ceGrid.css" rel="stylesheet" type="text/css">
</head>
<?php

$host = "localhost";
$usuario = "Magsi";
$clave = "Magsi";

require 'dg/ceSQL.php';
require 'dg/ceGrid.php';

$dbase = new ceMySQLAdap($host,$usuario, $clave,"magsi_db");

$dg = new ceDataGrid($dbase); 

$dg->setQuery("MA_In_IdFinca,MA_V_Nombre,MA_V_IdDueho","ma_af_finca");

$dg->allowFilters();

$dg->showCreateButton("href='mt01.php'", ceDataGrid::TYPE_ONCLICK, 'Agregar');
$dg->setResultsPerPage(30);

$dg->setColumnHeader('MA_In_IdFinca', 'IdFinca');
$dg->setColumnHeader('MA_V_Nombre', 'Nombre');
$dg->setColumnHeader('MA_V_IdDueho', 'IdDueño');


$dg->addStandardControl(ceDataGrid::STDCTRL_EDIT, "href='mt02.php?id=%MA_In_IdFinca%'");
$dg->addStandardControl(ceDataGrid::STDCTRL_DELETE, "href='delete.php?id=%MA_In_IdFinca%'");

$dg->showReset("Refrescar");
$dg->printTable();
?>
</HTML>









